package design_pattern.proxy;

public class StaticProxy implements Subject{
	private Subject sub;
	public StaticProxy(Subject sub) {
		this.sub = sub;
	}
	

	public static void main(String[] args) {
		Subject sub = new RealSubject();
		new StaticProxy(sub).show();

	}


	@Override
	public void show() {
		System.out.println("before");
		sub.show();
		System.out.println("after");
		
	}

}

interface Subject{
	void show();
}

class RealSubject implements Subject{

	@Override
	public void show() {
		System.out.println("show");
	}
}
